package com.gateway.security.common.matcher;

import com.gateway.common.dto.ApiDefinition;

/**
 * @program: api-gateway
 * @description:
 * @author: YuKai Fan
 * @create: 2025/2/11 22:39
 **/
public class PermitAuthorizationServerWebExchangeMatcher extends ApiDefintionServerWebExchangeMatcher {

    public static final PermitAuthorizationServerWebExchangeMatcher INSTANCE = new PermitAuthorizationServerWebExchangeMatcher();

    private PermitAuthorizationServerWebExchangeMatcher() {
    }

    public static PermitAuthorizationServerWebExchangeMatcher getInstance() {
        return INSTANCE;
    }

    @Override
    protected boolean match(ApiDefinition apiDefinition) {
        return Boolean.FALSE.equals(apiDefinition.getAuthorization());
    }
}
